package system_code.IO;

import java.io.*;

public class Test1 {
    public static void main(String[] args) throws IOException {
        File f = new File("./test.txt");
        System.out.println(f.getName());//获取文件名
        System.out.println(f.getParent());//获取父文件
        System.out.println(f.getPath());//获取相抵路径
        System.out.println(f.getAbsolutePath());//获取绝对路径
        System.out.println(f.getCanonicalPath());//获取整理过后的绝对路径

    }
}
